{% if currencies|length > 1 %}
  {% if layout is defined and layout == 'list' %}
  <form action="{{ action }}" method="post" enctype="multipart/form-data" class="form-currency">
    <div class="btn-group">
      <span class="title">{{ text_currency }}</span>
      <ul class="{{extra_class}}">
        {% for currency in currencies %}
        {% if currency.symbol_left %}
        <li>
          <button class="currency-select btn btn-link btn-block" type="button" name="{{ currency.code }}">{{ currency.symbol_left }}</button>
        </li>
        {% else %}
        <li>
          <button class="currency-select btn btn-link btn-block" type="button" name="{{ currency.code }}">{{ currency.symbol_right }}</button>
        </li>
        {% endif %}
        {% endfor %}
      </ul>
    </div>
  </form>
  {% else %}
    <div class="pull-right padding-left-20 {% if extra_class is defined %} {{extra_class}}{% endif %}">
      <form action="{{ action }}" method="post" enctype="multipart/form-data" class="form-currency">
        <div class="btn-group">
          <button class="btn btn-link dropdown-toggle" data-toggle="dropdown">{% for currency in currencies %}
          {% if currency.symbol_left and currency.code == code %} <strong {% if icon_color %}style="color:{{icon_color}};"{% endif %}>{{ currency.symbol_left }}</strong> {% elseif currency.symbol_right and currency.code == code %} <strong {% if icon_color %}style="color:{{icon_color}};"{% endif %}>{{ currency.symbol_right }}</strong> {% endif %}
          {% endfor %} <span class="hidden-xs hidden-sm hidden-md" {% if text_link_color %}style="color:{{text_link_color}};"{% endif %}>{{ text_currency }}</span>&nbsp;<i class="fa fa-angle-down" {% if button_color %} style="color:{{button_color}};"{% endif %}></i></button>
          <ul class="dropdown-menu dropdown-menu-right">
            {% for currency in currencies %}
            {% if currency.symbol_left %}
            <li>
              <button class="currency-select btn btn-link btn-block" type="button" name="{{ currency.code }}">{{ currency.symbol_left }} {{ currency.title }}</button>
            </li>
            {% else %}
            <li>
              <button class="currency-select btn btn-link btn-block" type="button" name="{{ currency.code }}">{{ currency.symbol_right }} {{ currency.title }}</button>
            </li>
            {% endif %}
            {% endfor %}
          </ul>
        </div>
        <input type="hidden" name="code" value="" />
        <input type="hidden" name="redirect" value="{{ redirect }}" />
      </form>
    </div>
  {% endif %}
{% endif %}